<?php
require_once '../sub/init.php';
if(is_mobile())header("Location: ".mHref('my_info'));
$currfields = "dataflag,grade,RZ,mob";
require_once 'my_chkuser.php';

$data_RZ=$row['RZ'];$RZarr=explode(',',$data_RZ);
$dataflag  = intval($row['dataflag']);
$cook_grade= $row['grade'];
$cook_mob= $row['mob'];
$cook_dataflag= $dataflag;

require_once ZEAI.'cache/udata.php';$sex_ARR = json_decode($_UDATA['sex'],true);$extifshow = json_decode($_UDATA['extifshow'],true);
require_once ZEAI.'cache/config_up.php';
require_once ZEAI.'sub/zeai_up_func.php';
require_once ZEAI.'cache/config_vip.php';

header("Cache-control: private");
$t = (ifint($t,'1-5','1'))?$t:1;
$shalou_row=shalou_data($cook_uid);
$myinfobfb = intval(get_shalou_ed_bfb($shalou_row));
$switch    = json_decode($_ZEAI['switch'],true);
$data_nomodF=explode(',',$_ZEAI['data_nomodF']);

//文本填写资料正式库
$FA=udata_arr('all','userF');
$currfields_sl=$FA.',areatitle,area2title,'.get_mate_fld('list');
$row_item = $db->ROW(__TBL_USER__,$currfields_sl,"id=".$cook_uid,"name");
if($_ZEAI['data_sh_item']=='text'){
	$if_data_sh_item=($cook_dataflag==1)?true:false;
}

if($submitok == 'ajax_photo_s_up'){
	//禁止修改
	if(@in_array('photo_s',$data_nomodF) && !empty($row_item['photo_s'])  )json_exit(array('flag'=>0,'msg'=>'头像暂时不能更换哦'));
	if (ifpostpic($file['tmp_name'])){
		$dbname = setphotodbname('tmp',$file['tmp_name'],$cook_uid.'_m_');
		if (!up_send($file,$dbname,$_UP['ifwaterimg'],$_UP['upBsize']))json_exit(array('flag'=>0,'msg'=>'图片写入失败'));
		if (!ifpic(UP.$dbname))json_exit(array('flag'=>0,'msg'=>'图片格式错误'));
		json_exit(array('flag'=>1,'msg'=>'上传成功','tmpphoto'=>$dbname));
	}else{
		json_exit(array('flag'=>0,'msg'=>'zeai_tmp_name_error'));
	}
}elseif($submitok == 'ajax_weixin_pic_up'){
	if (ifpostpic($file['tmp_name'])){
		$dbname = setphotodbname('photo',$file['tmp_name'],$cook_uid.'_wxpic_');
		if (!up_send($file,$dbname,0,$_UP['upBsize']))json_exit(array('flag'=>0,'msg'=>'图片写入失败'));
		$newpic = UP.$dbname;
		if (!ifpic($newpic))json_exit(array('flag'=>0,'msg'=>'图片格式错误'));
		$db->query("UPDATE ".__TBL_USER__." SET weixin_pic='$dbname' WHERE id=".$cook_uid);
		@up_send_userdel($data_weixin_pic);
		$shalou_row['weixin_pic'] = $dbname;
		Dmod(encode_json($shalou_row));
		json_exit(array('flag'=>1,'msg'=>'上传成功','dbname'=>$dbname));
	}else{
		json_exit(array('flag'=>0,'msg'=>'zeai_tmp_name_error'));
	}
}elseif($submitok == 'modupdate'){
	$setsql = "";
	switch ($t) {
		case 1:
			$form_data=udata_arr('basic_form');
			$SQLli="";
			foreach($form_data as $F){
				$T = $F['fieldname'];$subkind = $F['subkind'];
				$F = $F['fieldname'];
				$V = $$F;
				if($F=='photo_s'  || (@in_array($F,$data_nomodF) && !empty($row_item[$F]) )  )continue;
				if($subkind==1){
					$V=($F=='aboutus')?dataIO(trimhtml($V,'keep_rn'),'in'):trimhtml($V);
					if($row_item[$F]!=$V && !empty($V) && $_ZEAI['data_sh_item']=='text')$if_data_sh_item=false;//文本填写资料，文本值有变化，进入沙漏
				}elseif($subkind==2){
					$V=intval($V);
				}
				switch ($F) {
					case 'areaid':
						$shalou_row['areatitle']=$areatitle;
						$SQLli.=",areatitle='".$areatitle."'";
					break;
					case 'area2id':
						$shalou_row['area2title']=$area2title;
						$SQLli.=",area2title='".$area2title."'";
					break;
					case 'aboutus':
						if(str_len($V)>2000)json_exit(array('flag'=>0,'msg'=>'【'.$T.'】字太多，请控制在2000个字以内'));
					break;
					case 'nickname':
						if(str_len($V)>50)json_exit(array('flag'=>0,'msg'=>'【'.$T.'】字太多，请控制在50个字以内'));
					break;
				}
				if(!empty($V)){
					$shalou_row[$F]=$V;
					$SQLli.=",".$F."='".$V."'";
				}
			}
			$setsql .= $SQLli;
		break;
		case 3:
			$sql = array();
			foreach ($extifshow as $V) {
				$F = $V['f'];
				$D = $$F;
				if($shalou_row['sex']==2 && $F=='tag1')continue;
				if($shalou_row['sex']==1 && $F=='tag2')continue;
				switch ($V['s']) {
					case 1://text
						$D     = dataIO(trimhtml($D),'in',100);
						$sql[] = "$F='".$D."'";
						if($row_item[$F]!=$D && !empty($D) && $_ZEAI['data_sh_item']=='text')$if_data_sh_item=false;//文本填写资料，文本值有变化，进入沙漏
					break;
					case 2://select
						$sql[] = "$F=".intval($D)."";
					break;
					case 3://checkbox
						$D = (is_array($D))?implode(',',$D):'';
						if($F=='tag1' || $F=='tag2'){
							$shalou_row['tag']=$D;
							$sql[] = "tag = '".$D."'";
						}else{
							//$shalou_row[$F]=$D;
							$sql[] = "$F = '".$D."'";
						}
					break;
				}
				if($F!='tag1' && $F!='tag2')$shalou_row[$F]=$D;
			}
			$sql     = (is_array($sql))?','.implode(',',$sql):'';
			$setsql .= $sql;
		break;
		case 4:
			$mate_diy = explode(',',$_ZEAI['mate_diy']);
			$sql = array();
			if(count($mate_diy) >= 1 && is_array($mate_diy)){
				foreach ($mate_diy as $F) {
					switch ($F) {
						case 'areaid':
							$shalou_row['mate_areaid']   =$mate_areaid;
							$shalou_row['mate_areatitle']=$mate_areatitle;
							$sql[] = "mate_areaid = '".$mate_areaid."'";
							$sql[] = "mate_areatitle = '".$mate_areatitle."'";
						break;
						case 'areaid2':
							$shalou_row['mate_areaid2']   =$mate_areaid2;
							$shalou_row['mate_areatitle2']=$mate_areatitle2;
							$sql[] = "mate_areaid2 = '".$mate_areaid2."'";
							$sql[] = "mate_areatitle2 = '".$mate_areatitle2."'";
						break;
						default:
							$ext = mate_diy_par($F,'ext');
							if($ext=='radiorange'){
								$F1='mate_'.$F.'1';
								$F2='mate_'.$F.'2';
								$shalou_row[$F1]=$$F1;
								$shalou_row[$F2]=$$F2;
								//
								$sql[] = "$F1 = '".$$F1."'";
								$sql[] = "$F2 = '".$$F2."'";
							}elseif($ext=='checkbox'){
								$tmp = 'mate_'.$F;
								$list=$$tmp;
								$list = (is_array($list))?implode(',',$list):'';
								$shalou_row[$tmp]=$list;
								$sql[] = "$tmp = '".$list."'";
							}else{
								$tmp = 'mate_'.$F;
								$shalou_row[$tmp]=$$tmp;
								$sql[] = "$tmp = '".$$tmp."'";
							}
						break;
					}
				}
				$sql = (is_array($sql))?','.implode(',',$sql):'';
				$setsql .= $sql;
			}
		break;
		case 5:
			$address = dataIO(trimhtml($address),'in',100);
			$qq      = dataIO(trimhtml($qq),'in',15);
			$weixin  = dataIO(trimhtml($weixin),'in',50);
			$email   = dataIO(trimhtml($email),'in',50);
			$mob     =(!ifmob($mob))?0:$mob;
			if ($mob != $mob_old){
				$row = $db->ROW(__TBL_USER__,'nickname',"mob='$mob' AND mob<>'' AND FIND_IN_SET('mob',RZ)");
				if($row){json_exit(array('flag'=>1,'msg'=>'“手机”已被【'.dataIO($row[0],'out').'】占用'));}else{$setsql .= ",mob='$mob'";}
				$ifmod=true;
			}
			if ($email != $email_old){
				$row = $db->ROW(__TBL_USER__,'nickname',"email='$email' AND email<>'' AND FIND_IN_SET('email',RZ)");
				if($row){json_exit(array('flag'=>1,'msg'=>'“邮箱”已被【'.dataIO($row[0],'out').'】占用'));}else{$setsql .= ",email='$email'";$shalou_row['email']=$email;}
				$ifmod=true;
			}
			if ($qq != $qq_old){
				$row = $db->ROW(__TBL_USER__,'nickname',"qq='$qq' AND qq<>'' AND FIND_IN_SET('qq',RZ)");
				if($row){json_exit(array('flag'=>1,'msg'=>'“QQ”已被【'.dataIO($row[0],'out').'】占用'));}else{$setsql .= ",qq='$qq'";$shalou_row['qq']=$qq;}
				$ifmod=true;
			}
			if(!empty($address) && $address != $address_old){
				$shalou_row['address']= $address;	
				$setsql .= ",address='$address'";
				$ifmod=true;
			}
			if(!empty($weixin) && $weixin != $weixin_old){
				$shalou_row['weixin'] = $weixin;
				$setsql .= ",weixin='$weixin'";
				$ifmod=true;
			}
			if($_ZEAI['data_sh_item']=='text' && $ifmod)$if_data_sh_item=false;//文本填写资料，文本值有变化，进入沙漏
		break;
		default:exit;break;
	}
	Dmod(encode_json($shalou_row));
	$dataflag = ($switch['sh']['moddata_'.$cook_grade] == 1)?1:0;
	//更新主库
	if($dataflag==1 || $if_data_sh_item || $t==4){
		$setsql = ($t==4)?ltrim($setsql,','):"dataflag=1".$setsql;
		$db->query("UPDATE ".__TBL_USER__." SET ".$setsql." WHERE id=".$cook_uid);
		set_data_ed_bfb($cook_uid);
	}else{
		$db->query("UPDATE ".__TBL_USER__." SET dataflag=0 WHERE id=".$cook_uid);
	}
	json_exit(array('flag'=>1,'msg'=>'修改成功','jumpurl'=>$jumpurl));
}else{
	$t = (ifint($t,'1-5','1'))?$t:1;
	switch ($t) {
		case 1:$mini_title  = '基本资料';break;
		case 2:$mini_title  = '自我介绍';break;
		case 3:$mini_title  = '详细资料';if (@count($extifshow) == 0 || !is_array($extifshow))alert('暂无详细资料！','back');break;
		case 4:$mini_title  = '择偶要求';break;
		case 5:$mini_title  = '联系方式';break;
	}
}
switch ($dataflag){
	case 0:$dataflag_str = '审核中';$datafloag_sty='flag0';break;
	case 1:$dataflag_str = '审核通过';$datafloag_sty='flag1';break;
	case 2:$dataflag_str = '审核未通过，请修改后重新提交';$datafloag_sty='flag2';break;
}
$zeai_cn_menu = 'my_info';?>
<!doctype html><html><head><meta charset="utf-8">
<title>个人资料 - <?php echo $_ZEAI['siteName'];?></title>
<link href="<?php echo RES;?>p/css/p.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>p/css/my.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>p/css/my_info.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>p/js/p.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo HOST;?>/cache/udata.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo HOST;?>/cache/areadata.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>select4.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>p/js/date_input.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php if($t == 4){$mate_diy = explode(',',$_ZEAI['mate_diy']);?>
<script>
var nulltext = '不限';
var mate_areaid_ARR1 = areaARR1,
mate_areaid_ARR2 = areaARR2,
mate_areaid_ARR3 = areaARR3,
mate_areaid_ARR4 = areaARR4;
var mate_areaid2_ARR1 = areaARRhj1,
mate_areaid2_ARR2 = areaARRhj2,
mate_areaid2_ARR3 = areaARRhj3,
mate_areaid2_ARR4 = areaARRhj4;
var
mate_age_ARR  = age_ARR,
mate_age_ARR1 = age_ARR,
mate_age_ARR2 = age_ARR,
mate_heigh_ARR  = heigh_ARR,
mate_heigh_ARR1 = heigh_ARR,
mate_heigh_ARR2 = heigh_ARR,
mate_weigh_ARR  = weigh_ARR,
mate_weigh_ARR1 = weigh_ARR,
mate_weigh_ARR2 = weigh_ARR,
mate_pay_ARR = pay_ARR,
mate_edu_ARR = edu_ARR,
mate_love_ARR = love_ARR,
mate_job_ARR = job_ARR,
mate_house_ARR = house_ARR,
mate_child_ARR = child_ARR,
mate_marrytime_ARR = marrytime_ARR,
mate_companykind_ARR = companykind_ARR,
mate_smoking_ARR = smoking_ARR,
mate_drink_ARR = drink_ARR,
mate_car_ARR = car_ARR;
var ifage=false,ifheigh=false,ifweigh=false;
<?php if (in_array('age',$mate_diy)){?>ifage=true;<?php }?>
<?php if (in_array('heigh',$mate_diy)){?>ifheigh=true;<?php }?>
<?php if (in_array('weigh',$mate_diy)){?>ifweigh=true;<?php }?>
</script>
<?php }?>
<style>
.my_info_bfb i{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.3)}
.my_info_bfb span{color:<?php echo $_ZEAI['mob_mbcolor'];?>}
</style>
</head>
<body>
<?php require_once ZEAI.'p/my_top.php'; ?>
<div class="main">
	<div class="mainL"><?php require_once ZEAI.'p/my_left.php';?></div>
	<div class="mainR">
        <div class="zeai_my_box myRM">
        	<h1>个人资料<font class="<?php echo $datafloag_sty;?>"><?php echo $dataflag_str;?></font></h1>
            <div class="tab">
            	<a href="<?php echo SELF;?>?t=1"<?php echo (empty($t) || $t==1)?' class="ed"':'';?>>基本资料</a>
            	<a href="<?php echo SELF;?>?t=3"<?php echo ($t==3)?' class="ed"':'';?>>详细资料</a>
            	<a href="<?php echo SELF;?>?t=4"<?php echo ($t==4)?' class="ed"':'';?>>择偶条件</a>
            	<a href="<?php echo SELF;?>?t=5"<?php echo ($t==5)?' class="ed"':'';?>>联系方式</a>
            </div>
            <div id="my_info_bfb" class="my_info_bfb<?php if ($myinfobfb >= 90){echo ' my_info_bfb_nb';}?>">
                <i id="my_info_bfbbar"></i><span>当前资料完整度<?php echo $myinfobfb;?>％</span>
            </div> 
            <form id="ZeaiCnForm">
             <!-- start C -->
            <div class="myRC">
                <!-- 基本资料 -->
                <?php
				if ($t == 1){
				$form_data=udata_arr('basic_form');
				?>
                <dl style="margin:30px 0"><dt>地图坐标</dt><dd>
                    <div class="mapbtnbox">
                        <a href="###" id="Zeai_map_btn"><i class="ico" title="看看在您附近的都有哪些朋友。">&#xe61f;</i><span>标注位置</span></a>
                        <span class="tips">设置成功后，可以查看您附近的人</span>
                    </div>
                </dd></dl>        
				<!---->
                <?php
				foreach($form_data as $V){
					$F = $V['fieldname'];
					$class = '';
					$DATA = $shalou_row[$F];$DATA_str = $DATA;
					//禁止修改
					if(!empty($row_item[$F]) && @in_array($F,$data_nomodF))continue;
					switch ($V['subkind']) {
						case 1:
							$Fkind = 'text';
							$class=' class="input W300"';
							$DATA = trimhtml(dataIO($DATA,'out'),'keep_rn');
							$DATA_str = $DATA;
						break;
						case 2:
							$Fkind = 'radio';
							if($F=='job')$Fkind = 'select';
						break;
						case 3:$Fkind = 'checkbox';break;
						case 4:$Fkind = 'select';break;
					}
					//控件类型-特殊
					switch ($F) {
						case 'aboutus':$Fkind = 'textarea';$class=' class="textarea" placeholder="简短个人介绍，三观等（全部人工审核，切勿填写联系方式 否则资料无法通过。" ';break;
					}
					//输出
					if($F=='photo_s'){
						if(!empty($DATA)){
							$photo_s_url = UP.$DATA;
							$photo_b_url = smb($photo_s_url,'b');
							$photo_s_str = '<div class="photo_s" style=\'background-image:url("'.$photo_s_url.'")\'><span>更换头像</span></div>';
						}else{
							$photo_s_str = '<p class="icoadd" title="上传头像"><i class="ico">&#xe622;</i></p>';
						}
						?>
                        <dl class="picadd"><dt><font class="Cf00 S16">*</font> 头像照片</dt><dd>
                            <div id="photo_s" class="W100"><?php echo $photo_s_str; ?></div>
                        </dd></dl>
						<?php
					}elseif($F=='nickname'){?>
                        <dl><dt><font class="Cf00 S16">*</font> <?php echo $V['title'];?></dt><dd>
                            <?php if (empty($DATA_str)){ ?>
                            <input name="<?php echo $F;?>" type="text" class="input W150" id="<?php echo $F;?>" value="<?php echo $DATA_str; ?>" maxlength="20"><span class="tips">只有一次修改机会哦</span>
                            <?php }else{echo $DATA_str."<input name='".$F."' id='".$F."' type='hidden' value='".$DATA_str."'>";}?>
                        </dd></dl>
						<?php
					}elseif($F=='birthday'){
						$DATA_str = (!ifdate($DATA_str))?'':$DATA_str;?>
                        <dl><dt><font class="Cf00 S16">*</font> <?php echo $V['title'];?></dt><dd>
                            <?php if (empty($DATA_str) || $DATA_str == '0000-00-00'){ ?>
                            <input name="<?php echo $F;?>" id="<?php echo $F;?>" type="text" readonly class="input W150" value="<?php echo $DATA_str; ?>" size="10" maxlength="10" onfocus="this.select()" onClick="fPopCalendar(event,this,this)"><span class="tips">只有一次修改机会哦</span>
                             <?php }else{
                                 echo $DATA_str."<input name='birthday' id='birthday' type='hidden' value='".$DATA_str."'>";
                            }?>
                        </dd></dl>
						<?php
					}elseif($F=='areaid'){
						$areaid = explode(',',$shalou_row['areaid']);
						$a1 = $areaid[0];$a2 = $areaid[1];$a3 = $areaid[2];$a4 = $areaid[3];
						$areatitle  = dataIO($shalou_row['areatitle'],'out');?>
                        <dl><dt><font class="Cf00 S16">*</font> <?php echo $V['title'];?></dt><dd><script>LevelMenu4('a1|a2|a3|a4|请选择|<?php echo $a1; ?>|<?php echo $a2; ?>|<?php echo $a3; ?>|<?php echo $a4; ?>|areaid|areatitle|<?php echo $areatitle;?>',' class="SW SW_area"');</script></dd></dl>	
						<?php
					}elseif($F=='area2id'){
						$area2id = explode(',',$shalou_row['area2id']);
						$a11 = $area2id[0];$a22 = $area2id[1];$a33 = $area2id[2];$a44 = $area2id[3];
						$area2title  = dataIO($shalou_row['area2title'],'out');?>
                        <dl><dt><font class="Cf00 S16">*</font> <?php echo $V['title'];?></dt><dd><script>LevelMenu4('a11|a22|a33|a44|请选择|<?php echo $a11; ?>|<?php echo $a22; ?>|<?php echo $a33; ?>|<?php echo $a44; ?>|area2id|area2title|<?php echo $area2title;?>',' class="SW SW_area"','hj');</script></dd></dl>
						<?php
					}else{
						?>
						<dl><dt><font class="Cf00 S16">*</font> <?php echo $V['title'];?></dt><dd><script>zeai_cn__CreateFormItem('<?php echo $Fkind;?>','<?php echo $F;?>','<?php echo $DATA_str; ?>','<?php echo $class;?>');</script></dd></dl>
                		<?php
					}
				}?>
				<!---->
                <input type="button" value="　修改并保存　" class="btn size4 HONG" style="margin:0 0 10px 0" onclick="chkform(1)">
                <div class="C8d">温馨提示：完善所有资料，交友成功率将暴增</div>
                <input name="t" type="hidden" value="<?php echo $t; ?>" />
                <input name="submitok" type="hidden" value="modupdate" />
                <input name="jumpurl" id="jumpurl" type="hidden" value="<?php echo $jumpurl; ?>" />

                <!-- 详细资料 -->
                <?php }elseif ($t == 3){
                    if (@count($extifshow) >= 1 && is_array($extifshow)){
                        foreach ($extifshow as $V) {
                            $fcls = '';$F = $V['f'];
							$DATA = $shalou_row[$F];$DATA_str = $DATA;
                            switch ($V['s']) {
                                case 1:
									$Fkind = 'text';$fcls=' class="input W300" placeholder="请输入'.$V['t'].'"';
									$DATA = trimhtml(dataIO($DATA,'wx'),'keep_rn');
									$DATA_str = $DATA;
								break;
                                case 2:$Fkind = 'select';break;
                                case 3:$Fkind = 'checkbox';break;
                                case 4:$Fkind = 'range';break;
                            }
                            if($shalou_row['sex']==2 && $F=='tag1')continue;
                            if($shalou_row['sex']==1 && $F=='tag2')continue;
							if($F=='tag1' || $F=='tag2')$DATA_str=$shalou_row['tag'];
                            ?>
                            <dl><dt><?php echo $V['t'];?></dt><dd><script>zeai_cn__CreateFormItem('<?php echo $Fkind;?>','<?php echo $F;?>','<?php echo $DATA_str; ?>','<?php echo $fcls;?>');</script></dd></dl>
                        	<?php
                        }
                    }
                    ?>
                    <tr><td colspan="2" class="center">
                    <input name="submitok" type="hidden" value="modupdate" />
                    <input name="t" type="hidden" value="<?php echo $t; ?>" />
                    <button type="button" class="btn size4 HONG" style="margin:20px 0 10px 0" onclick="chkform(3)">　修改并保存　</button> 
                <!-- 择偶要求 -->
                <?php }elseif ($t == 4){?><br>
                    <?php
                    if (count($mate_diy) >= 1 && is_array($mate_diy)){
                        foreach ($mate_diy as $k=>$V) {
                            $cook_tmp1 = 'mate_'.$V;
                            $cook_mate_data = $shalou_row[$cook_tmp1];
                            $ext = mate_diy_par($V,'ext');
                            ?>
                            <dl><dt><?php echo mate_diy_par($V);?></dt><dd>
                            <?php 
                            switch ($ext) {
                                case 'radio':?><script>zeai_cn__CreateFormItem('select','<?php echo $cook_tmp1;?>','<?php echo $cook_mate_data; ?>','',<?php echo $cook_tmp1.'_ARR';?>);</script><?php ;break;
                                case 'checkbox':?><script>zeai_cn__CreateFormItem('checkbox','<?php echo $cook_tmp1;?>','<?php echo $cook_mate_data; ?>','',<?php echo $cook_tmp1.'_ARR';?>);</script><?php break;
                                case 'radiorange':
                                    $cook_tmp1_1 = 'mate_'.$V.'1';
                                    $cook_mate_data_1 = $shalou_row[$cook_tmp1_1];
                                    $cook_tmp1_2 = 'mate_'.$V.'2';
                                    $cook_mate_data_2 = $shalou_row[$cook_tmp1_2];
                                    ?>
                                    <script>zeai_cn__CreateFormItem('select','<?php echo $cook_tmp1_1;?>','<?php echo $cook_mate_data_1; ?>','',<?php echo $cook_tmp1.'_ARR';?>);</script>
                                     ～ 
                                    <script>zeai_cn__CreateFormItem('select','<?php echo $cook_tmp1_2;?>','<?php echo $cook_mate_data_2; ?>','',<?php echo $cook_tmp1.'_ARR';?>);</script>
                                    <?php break;
                                case 'area':
                                    if($V=='areaid2'){
                                        $idlist='h1|h2|h3|h4';
										$mate_areaid2   = explode(',',$shalou_row['mate_areaid2']);
										$h1 = $mate_areaid2[0];$h2 = $mate_areaid2[1];$h3 = $mate_areaid2[2];$h4 = $mate_areaid2[3];
                                        $deflist= $h1.'|'.$h2.'|'.$h3.'|'.$h4;
                                        $iputhienT = 'mate_areatitle2';
										$iputhienV = $shalou_row['mate_areatitle2'];
                                        $hj='hj';
                                    }else{
                                        $idlist='m1|m2|m3|m4';
										$mate_areaid    = explode(',',$shalou_row['mate_areaid']);
										$m1 = $mate_areaid[0];$m2 = $mate_areaid[1];$m3 = $mate_areaid[2];$m4 = $mate_areaid[3];
                                        $deflist= $m1.'|'.$m2.'|'.$m3.'|'.$m4;
                                        $iputhienT = 'mate_areatitle';
										$iputhienV = $shalou_row['mate_areatitle'];
                                        $hj='';
                                    }?>
									<script>LevelMenu4('<?php echo $idlist;?>|'+nulltext+'|<?php echo $deflist;?>|<?php echo $cook_tmp1;?>|<?php echo $iputhienT;?>|<?php echo $iputhienV;?>',' class="SW SW_area"','<?php echo $hj;?>');</script><?php break;
                            }
                            ?>
                            </dd></dl>
                    <?php }}?>
                    <input name="submitok" type="hidden" value="modupdate" />
                    <input name="t" type="hidden" value="<?php echo $t; ?>" />
                    <input name="jumpurl" type="hidden" value="<?php echo $jumpurl; ?>" />
                    <button type="button" class="btn size4 HONG" style="margin:20px 0 10px 0" onclick="chkform(4)">　修改并保存　</button> 
        
                <!-- 联系方式 -->
                <?php }elseif ($t == 5){
					$address    = trimhtml(dataIO($shalou_row['address'],'out'));
					$weixin     = trimhtml(dataIO($shalou_row['weixin'],'out'));
					$qq         = trimhtml(dataIO($shalou_row['qq'],'out'));
					$email      = trimhtml(dataIO($shalou_row['email'],'out'));
					$weixin_pic = trimhtml(dataIO($shalou_row['weixin_pic'],'out'));
					if(!empty($weixin_pic)){
						$weixin_pic_url = UP.$weixin_pic;
						$weixin_pic_str = '<div class="photo_s" style=\'border-radius:0;background-image:url("'.$weixin_pic_url.'")\'><span>更换二维码</span></div>';
					}else{
						$weixin_pic_str = '<p class="icoadd" title="上传微信二维码"><i class="ico">&#xe622;</i></p>';
					}
					?>
                    <style>
					.myRC dl{margin:30px auto}
					.myRC dl .ewmysbox{position:relative}
					.myRC dl.picadd .ewmys{position:absolute;left:300px;top:30px}
                    </style>
                    <dl><dt><font class="Cf00 S16">*</font> 手　机</dt><dd><input name="mob" type="text" class="input W300" id="mob" value="<?php echo $cook_mob; ?>" maxlength="11"<?php echo (in_array('mob',$RZarr) && ifmob($cook_mob))?' readonly':'';?>><span class="tips">可隐藏，<a href="my_set.php?t=2" class="a09f">隐私设置</a></span><?php echo (in_array('mob',$RZarr) && ifmob($cook_mob))?'　　<font class="C090"><i class="ico">&#xe60f;</i> 已认证</font>':'';?></dd></dl>
                    
                    <dl><dt><font class="Cf00 S16">*</font> 微信号</dt><dd><input name="weixin" type="text" class="input W300" id="weixin" value="<?php echo $weixin; ?>" maxlength="30"<?php echo (in_array('weixin',$RZarr) && !empty($weixin))?' readonly':'';?>><?php if ($_VIP['hideprivacy'] == 1){?><span class="tips">可隐藏，<a href="my_set.php?t=2" class="a09f">隐私设置</a></span><?php }?></dd></dl>
                    
                    <dl class="picadd"><dt>微信二维码</dt><dd class="ewmysbox">
                        <div id="ewmys" class="W100"><?php echo $weixin_pic_str; ?></div>
                        <?php if ($_VIP['hideprivacy'] == 1){?><span class="tips ewmys">可隐藏，<a href="my_set.php?t=2" class="a09f">隐私设置</a></span><?php }?>
                    </dd></dl>
                    
                    <dl><dt>QQ</dt><dd><input name="qq" type="text" class="input W300" id="qq" value="<?php echo $qq; ?>" maxlength="12"<?php echo (in_array('qq',$RZarr) && !empty($qq))?' readonly':'';?>><?php if ($_VIP['hideprivacy'] == 1){?><span class="tips">可隐藏，<a href="my_set.php?t=2" class="a09f">隐私设置</a></span><?php }?><?php echo (in_array('qq',$RZarr) && !empty($qq))?'　　<font class="C090"><i class="ico">&#xe60f;</i> 已认证</font>':'';?></dd></dl>
                    <dl><dt>邮　箱</dt><dd><input name="email" type="text" class="input W300" id="email" value="<?php echo $email; ?>" maxlength="50"<?php echo (in_array('email',$RZarr) && !empty($email))?' readonly':'';?>><?php if ($_VIP['hideprivacy'] == 1){?><span class="tips">可隐藏，<a href="my_set.php?t=2" class="a09f">隐私设置</a></span><?php }?><?php echo (in_array('email',$RZarr) && !empty($email))?'　　<font class="C090"><i class="ico">&#xe60f;</i> 已认证</font>':'';?></dd></dl>
                    <dl><dt>地　址</dt><dd><input name="address" type="text" class="input W300" id="address" value="<?php echo $address; ?>" maxlength="50"><span class="tips">保密，身份验证之用</span></dd></dl>
                    <input name="submitok" type="hidden" value="modupdate" />
                    <input name="t" type="hidden" value="<?php echo $t; ?>" />
                    <input name="qq_old" type="hidden" value="<?php echo $qq; ?>" />
                    <input name="mob_old" type="hidden" value="<?php echo $cook_mob; ?>" />
                    <input name="email_old" type="hidden" value="<?php echo $email; ?>" />
                    
                    <input name="address_old" type="hidden" value="<?php echo $address; ?>" />
                    <input name="weixin_old" type="hidden" value="<?php echo $weixin; ?>" />
                    
                    <input name="jumpurl" type="hidden" value="<?php echo $jumpurl; ?>" />
                    <button type="button" class="btn size4 HONG" style="margin:20px 0 10px 0" onclick="chkform(5)">修改并保存</button> 
                <?php }?>
            </div>
            <!-- end C -->
            </form>
        
        </div>
    </div>
</div>
<script>var uid=<?php echo $cook_uid;?>,zeaimap,data_myinfobfb=<?php echo $myinfobfb;?>,upMaxMB = <?php echo $_UP['upMaxMB']; ?>,up2='<?php echo UP;?>';</script>
<script src="<?php echo RES;?>p/js/my_info.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php
function Dmod($jsonstr){
	global $db,$cook_uid;
	$uid=intval($cook_uid);
	$row = $db->ROW(__TBL_SHALOU__,"uid","uid=".$uid);
	if ($row){
		$db->query("UPDATE ".__TBL_SHALOU__." SET jsonstr='$jsonstr',addtime=".ADDTIME." WHERE uid=".$uid);
	}else{
		$db->query("INSERT INTO ".__TBL_SHALOU__." (uid,jsonstr,addtime) VALUES ($uid,'$jsonstr',".ADDTIME.")");
	}
}
require_once ZEAI.'p/bottom.php';?>